<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
	<head>
		<title>My JSP 'jurisdiction.jsp' starting page</title>
		<link rel="stylesheet" type="text/css"
			href="${pageContext.request.contextPath}/easyui/1.3.4/themes/default/easyui.css" />
		<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/wu.css" />
		<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/icon.css" />
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-1.8.0.min.js"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/easyui/1.3.4/jquery.easyui.min.js"></script>
		<script type="text/javascript"
			src="${pageContext.request.contextPath}/easyui/1.3.4/locale/easyui-lang-zh_CN.js"></script>


	</head>

	<body class="easyui-layout">
		<div data-options="region:'west'" style="width: 200px;">
			<ul>
				<c:forEach var="p" items="${plist}">
					<li style="list-style: none; margin-top: 15px; font-size: 14px">
						<a href="${pageContext.request.contextPath}/power?op=showid&id=${p.id }">${p.role.rolename }</a>
					</li>
				</c:forEach>
			</ul>
		</div>
		<div data-options="region:'center'">
			<div>
				
					<c:if test="${pb==null}"><h1>请选择需要修改权限的角色</h1></c:if>
					<c:if test="${pb!=null}">
					
					<form action="${pageContext.request.contextPath}/power?op=update" method="post">
<span style="display: none;">
						<c:if test="${pb.sysconfig==1}">
							<label>
								<input type="checkbox" name="sysconfig" value="1"
									checked="checked">
								系统配置
							</label>
						</c:if>
						<c:if test="${pb.sysconfig==0}">
							<label>
								<input type="checkbox" name="sysconfig" value="1">
								系统配置
							</label>
						</c:if>
</span>
						<c:if test="${pb.loginrecord==1}">
							<label>
								<input type="checkbox" name="loginrecord" value="1"
									checked="checked">
								登陆日志
							</label>
						</c:if>
						<c:if test="${pb.loginrecord==0}">
							<label>
								<input type="checkbox" name="loginrecord" value="1">
								登陆日志
							</label>
						</c:if>

						<c:if test="${pb.actionrecord==1}">
							<label>
								<input type="checkbox" name="actionrecord" value="1"
									checked="checked">
								操作日志
							</label>
						</c:if>
						<c:if test="${pb.actionrecord==0}">
							<label>
								<input type="checkbox" name="actionrecord" value="1">
								操作日志
							</label>
						</c:if>

						<c:if test="${pb.rolemanager==1}">
							<label>
								<input type="checkbox" name="rolemanager" value="1"
									checked="checked">
								角色管理
							</label>
						</c:if>
						<c:if test="${pb.rolemanager==0}">
							<label>
								<input type="checkbox" name="rolemanager" value="1">
								角色管理
							</label>
						</c:if>
					<span style="display: none;">
						<c:if test="${pb.powermanager==1}">
							<label>
								<input type="checkbox" name="powermanager" value="1"
									checked="checked">
								权限分配
							</label>
						</c:if>
						<c:if test="${pb.powermanager==0}">
							<label>
								<input type="checkbox" name="powermanager" value="1">
								权限分配
							</label>
						</c:if>
					</span>
						<c:if test="${pb.showinfo==1}">
							<label>
								<input type="checkbox" name="showinfo" value="1"
									checked="checked">
								发布通告
							</label>
						</c:if>
						<c:if test="${pb.showinfo==0}">
							<label>
								<input type="checkbox" name="showinfo" value="1">
								发布通告
							</label>
						</c:if>

						<c:if test="${pb.showtask==1}">
							<label>
								<input type="checkbox" name="showtask" value="1"
									checked="checked">
								显示任务
							</label>
						</c:if>
						<c:if test="${pb.showtask==0}">
							<label>
								<input type="checkbox" name="showtask" value="1">
								显示任务
							</label>
						</c:if>
<span style="display: none;">
						<c:if test="${pb.showtip==1}">
							<label>
								<input type="checkbox" name="showtip" value="1"
									checked="checked">
								工作安排与提醒
							</label>
						</c:if>
						<c:if test="${pb.showtip==0}">
							<label>
								<input type="checkbox" name="showtip" value="1">
								工作安排与提醒
							</label>
						</c:if>
</span>
						<c:if test="${pb.shownote==1}">
							<label>
								<input type="checkbox" name="shownote" value="1"
									checked="checked">
								显示便签
							</label>
						</c:if>
						<c:if test="${pb.shownote==0}">
							<label>
								<input type="checkbox" name="shownote" value="1">
								显示便签
							</label>
						</c:if>
						<input type="hidden" name="id" value="${pb.id }">

						<br>
						<input type="submit" value="保存">
					</form>
					</c:if>
				
			</div>
		</div>
	</body>
</html>
